package cat_catch_mice;

public class Mice {
    String name;//名字
    private int strength;//体力

    public int getStrength() {
        return strength;
    }

    public void setStrength(int strength) {
        if (strength>=0&&strength<=100){
            this.strength = strength;
        }else {
            this.strength=50;
            System.out.println("非法体力，默认体力为50");
        }
    }

    public void run(){
        System.out.println("跑");
    }
}
